<?php
	/** sous fonctionnalité d'affichage des membres
	 * @author Sebastian Mosser
	 */

class sfMemberEdit extends aSubFeature {


	public static function getReturnButton($id) {
		$ans = "<form action=\"sub_editMember.php\" method=\"get\">";
		$ans .= " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
		$ans .= " <input type=\"submit\" value=\"Retour\" class=\"edit\" />";
		$ans .= "</form>";
		return $ans;
	}


	public function __construct() {
		  $this->_acl = new AccessControlList(); 
      $this->_acl->setGranted(3);
      $this->_acl->setGranted(7);
		}


	protected function run() {
		$memberId = PropRetriever::getProp($_GET,"id");
		$aMember = Member::read($memberId);
		$member = "<input type=\"hidden\" name=\"memberId\" value=\"$memberId\" />";
		$page = <<<EOS
		
		<h1> Modification d'un adhérent </h1>
		
		<h2> Actions disponibles </h2>

<div align="center" >
<table>
<tr>
  <td>
  <form action="sub_editMemberInfos.php" method="post" accept-charset="utf-8 ">
   $member
   <input type="submit" value="Modifier les Informations" class="edit"/>
  </form>
  </td>
  <td> &nbsp;&nbsp;&nbsp;&nbsp; </td>
  <td>
  <form action="sub_editMemberFunctions.php" method="post" accept-charset="utf-8 ">
   $member
   <input type="submit" value="Modifier les Fonctions" class="edit"/>
  </form>
  </td>
  <td> &nbsp;&nbsp;&nbsp;&nbsp; </td>
  <td>
  <form action="sub_editMemberCotisations.php" method="post" accept-charset="utf-8 ">
   $member
   <input type="submit" value="Modifier les Cotisations" class="edit"/>
  </form>
  </td>
  <td> &nbsp;&nbsp;&nbsp;&nbsp; </td>
  <td>
  <form action="sub_editMemberPicture.php" method="post" accept-charset="utf-8 ">
   $member
   <input type="submit" value="Modifier la Photographie" class="edit"/>
  </form>
  </td>
</tr>
</table>
</div>
		
		<h2> Récapitulatif de l'adhérent </h2>
EOS;

		$page .= $aMember->displayLong();
		return $page;
	}

}


?>